Motor controller and method for controlling motor

ABSTRACT

A motor controller to control a motor includes a position controller, a speed controller, a first integrator, and a second integrator. The position controller is configured to generate a speed command based on a position error between a position command and a motor position. The speed controller is configured to generate a torque command to be input to the motor based on a speed error between the speed command and a motor speed. The first integrator is configured to calculate an integral value of the position error to be added to the position error. The second integrator is configured to calculate an integral value of the speed error to be added to the speed error.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims priority under 35 U.S.C. §119 to JapanesePatent Application No. 2014-237187, filed Nov. 21, 2014. The contents ofthis application are incorporated herein by reference in their entirety.

BACKGROUND

1. Field of the Invention

The embodiments disclosed herein relate to a motor controller and amethod for controlling a motor.

2. Discussion of the Background

WO 2006/011519 discloses a servo controller including a positioncontroller and a speed controller. In order to make a position errorclose to zero, the position controller performs proportional control (Pcontrol), and the speed controller performs proportional integralcontrol (PI control or I-P control). In addition, the servo controllerperforms speed feed-forward (FF) control.

SUMMARY

According to one aspect of the present disclosure, a motor controller tocontrol a motor includes a position controller, a speed controller, afirst integrator, and a second integrator. The position controller isconfigured to generate a speed command based on a position error betweena position command and a motor position. The speed controller isconfigured to generate a torque command to be input to the motor basedon a speed error between the speed command and a motor speed. The firstintegrator is configured to calculate an integral of the position errorto be added to the position error. The second integrator is configuredto calculate an integral of the speed error to be added to the speederror.

According to another aspect of the present disclosure, a method forcontrolling a motor includes generating a speed command based on aposition error between a position command and a motor position. A torquecommand to be input to the motor is generated based on a speed errorbetween the speed command and a motor speed. An integral of the positionerror to be added to the position error is calculated. An integral ofthe speed error to be added to the speed error is calculated.

BRIEF DESCRIPTION OF THE DRAWINGS

A more complete appreciation of the present disclosure and many of theattendant advantages thereof will be readily obtained as the samebecomes better understood by reference to the following detaileddescription when considered in connection with the accompanyingdrawings, wherein:

FIG. 1 is a block diagram illustrating a system configuration of a wholemotor controller according to an embodiment;

FIG. 2 is a diagram illustrating a comparison of errors corresponding torespective control configurations;

FIG. 3 illustrates a graph of step responses in double integralconfigurations;

FIG. 4 is a Bode diagram in the double integral configurations;

FIG. 5 is a table of parameters set according to a configuration of acomparative example and according to a configuration of the embodimentin simulation of FIGS. 3 and 4;

FIG. 6 is a diagram illustrating overshoots caused by a positionintegrator;

FIG. 7 illustrates a graph of step responses in a case where animperfect integral is applied to the position integrator;

FIG. 8 is a Bode diagram in the case where an imperfect integral isapplied to the position integrator;

FIG. 9 illustrates a torque graph in consideration of an amountcorresponding to viscous friction;

FIG. 10 illustrates a coefficient graph of gain stability in a casewhere 2π×40 is substituted for a speed control gain;

FIG. 11 illustrates a coefficient graph of gain stability in a casewhere 2π×200 is substituted for the speed control gain;

FIG. 12 is a Bode diagram of a control target applied to responsesimulation in the embodiment;

FIG. 13 illustrates a graph of a simulation result of an output positionin a comparative example;

FIG. 14 illustrates a graph of a simulation result of an output positionin the embodiment; example;

FIG. 16 illustrates a graph of a simulation result of an output speed inthe embodiment;

FIG. 17 illustrates a graph of a simulation result of a position errorin the comparative example;

FIG. 18 illustrates a graph of a simulation result of a position errorin the embodiment;

FIG. 19 illustrates a graph of a simulation result of a torque commandin the comparative example;

FIG. 20 illustrates a graph of a simulation result of a torque commandin the embodiment; and

FIG. 21 is a table of parameters set according to the configuration ofthe comparative example and according to the configuration of theembodiment in simulation of FIGS. 13 to 20.

DESCRIPTION OF THE EMBODIMENTS

The embodiments will now be described with reference to the accompanyingdrawings, wherein like reference numerals designate corresponding oridentical elements throughout the various drawings.

Outline of Configuration of Motor Controller

First, by referring to FIG. 1, a schematic configuration of a motorcontroller according to this embodiment will be described. Asillustrated in FIG. 1, a motor controller 100 controls the rotationposition (rotation angle; referred to as motor position in the drawings)of a motor M based on a position command input from an upper-levelcontroller, not illustrated. The following description will beconcerning the components of the motor controller 100 in relation toeach other, and internal configurations of the components will bedescribed in detail later. The illustrations in the drawings and thefollowing description will be all given based on transfer functions. InFIG. 1, the motor controller 100 according to this embodiment includes aposition controller 1, a speed controller 2, a speed feed-forwardcontroller 4, and a torque feed-forward controller 5.

Based on a position error (see A in FIG. 1), which is a differencebetween the input position command and the rotation position of themotor M, described later, the position controller 1 outputs a speedcommand (see B in FIG. 1) to reduce the position error. In thisembodiment, the position controller 1 performs what is called PI controlusing a position integrator 11 (which is the first integrator, theimperfect integrator) and a position control gain K_(p). The positionintegrator 11 calculates an integral value of the position error to beadded to the position error. The position error is added to an output ofthe position integrator 11, and the sum is multiplied by the positioncontrol gain K_(p). In this manner, the position controller 1 performsthe PI control.

Based on a speed error (see C in FIG. 1), which is a difference betweenthe speed command from the position controller 1 and a rotation speed ofthe motor M (referred to as motor speed in the drawings), describedlater, the speed controller 2 outputs a torque command (see E in FIG. 1)to reduce the speed error. In this embodiment, the speed controller 2performs what is called PI control using a speed integrator 12 (which isthe second integrator) and a speed control gain K_(v) (and a totalmoment of inertia J₀). The speed integrator 12 calculates an integralvalue of the speed error to be added to the speed error. The speed erroris added to the output of the speed integrator 12, and the sum ismultiplied by the speed control gain K_(v) (and the total moment ofinertia J₀). In this manner, the speed controller 2 performs the PIcontrol.

Based on the position command, the speed feed-forward controller 4generates a speed feed-forward command to reduce the position error, andadds the speed feed-forward command to the speed command.

Based on the position command, the torque feed-forward controller 5generates a torque feed-forward command to reduce the position error,and adds the torque feed-forward command to the torque command.

The motor M generates torque using drive current that accords with thetorque command so as to drive a load machine, not illustrated.

The motor controller 100 according to this embodiment having theabove-described configuration has a dual loop configuration made up of aposition control feedback loop and a speed control feedback loop.Specifically, the motor controller 100 includes the position controlfeedback loop (hereinafter referred to as position control loop). In theposition control loop, after the position command is input from theupper-level controller, not illustrated, a control signal is transmittedthrough the position controller 1, the speed controller 2, and the motorM in this order, and a detection signal of the motor position is fedback. Also, the motor controller 100 includes the speed control feedbackloop (hereinafter referred to as speed control loop). In the speedcontrol loop, a control signal is transmitted through the speedcontroller 2 and the motor M in this order, and a detection signal ofthe motor speed is fed back. To simplify the description of the wholesystem, the following description of this embodiment omits descriptionof a current controller to output a drive current by PWM control, forexample, to the motor M based on the torque command, and description ofa current control feedback loop incorporated in the current controller.

Features of this Embodiment

In recent years, to improve response performance of motor controllersincluding the above-described position control loop, there is a need forerror-less control, which constantly keeps the position error betweenthe position command and the motor position as close to zero aspossible. The position error will now be described in detail. Asrepresented in the uppermost time chart illustrated in FIG. 2, theposition error is a difference between a position command speed (aspeed-equivalent value obtained by first-order time differential of theposition command) that changes over time and an actually output motordifference position (a speed-equivalent value detected as a motorposition change amount at every control sampling cycle). The positionerror includes a steady-state error and an acceleration/decelerationerror. The steady-state error is in a steady-state range within whichthe motor speed is constant. The acceleration/deceleration error is inan acceleration/deceleration range within which the motor speed isincreased or decreased.

In the dual feedback loop configuration described above, a methodgenerally employed to implement control as close to the error-lesscontrol as possible is to provide one of the position controller 1 andthe speed controller 2 with a proportioner (P) and/or an integrator (I)so as to perform what is called PI control (or I-P control). Anothermethod is to perform the speed feed-forward control in addition to thePI control (or I-P control).

For example, as in exemplary configuration 1 illustrated in FIG. 2, theposition controller 1 may include a proportioner, and the speedcontroller 2 may include a proportioner and an integrator so as toperform what is called position-P-speed-PI control. In this case, eventhough the speed error is made close to 0, the position error occurs ona large scale both in the acceleration/deceleration error and thesteady-state error.

Alternatively, as in exemplary configuration 2 illustrated in FIG. 2,the position controller 1 may include a proportioner and an integrator,and the speed controller 2 may include a proportioner so as to performwhat is called position-PI-speed-P control. In this case, even thoughthe steady-state error is made close to zero, theacceleration/deceleration error remains large.

Alternatively, as in exemplary configuration 3 illustrated in FIG. 2,the position controller 1 may include a proportioner, and the speedcontroller 2 may include a proportioner and an integrator so as toperform what is called position-P-speed-PI control. In addition, speedfeed-forward control is performed with a speed feed-forward gain V_(ff)of 1 (=100%). This case exhibits errors approximate to the errors inexemplary configuration 2. However, the errors are likely to increasedue to disturbance.

In order to reduce occurrence of the position error, as described above,this embodiment has what is called a double integral configuration, inwhich both the position controller 1 and the speed controller 2 includean integrator. In order to suppress vibration at the time when motoroperation ends, in particular, an imperfect integrator is used as theintegrator of the position controller 1. This embodiment also takes intoconsideration balance adjustment of the gains to suppress occurrence ofvibration in the case of the double integral configuration. In order tofurther reduce the position error, torque feed-forward control inconsideration of viscous friction of the motor M is also performed.These features of this embodiment and the configuration to implement thefeatures will be described below. Analytic Investigation of DoubleIntegral Configuration

In the case of the position-P-speed-PI control, as in exemplaryconfiguration 3, the steady-state error (PosErr) is represented by thefollowing Formula (1) based on a known final-value theorem:

$\begin{matrix}{{PosErr} = \frac{1}{\frac{K_{p}}{1 - V_{ff}}}} & (1)\end{matrix}$

Referring to Formula (1), when the speed feed-forward coefficientV_(ff)=100%, the position error becomes asymptotically close to 0. Itis, however, only “asymptotically”, and the position error does notbecome strictly 0.

In order to make the position error strictly 0 with a simplest dual loopconfiguration, the position integrator 11 may be incorporated in theposition control loop. For example, in the position-PI-speed-P controlconfiguration, as in exemplary configuration 2, the transfer functionfrom the position command to the position error is represented by thefollowing Formula (2):

$\begin{matrix}{\frac{{K_{p}K_{v}s} + \frac{K_{p}K_{v}}{T_{pi}}}{s^{3} + {K_{v}s^{2}} + {K_{p}K_{v}s} + \frac{K_{p}K_{v}}{T_{pi}}} \cdot \frac{T_{pi}{s^{2}\left( {s + K_{v}} \right)}}{K_{p}{K_{v}\left( {1 + {T_{pi}s}} \right)}}} & (2)\end{matrix}$

Assuming a ramp command as the position command to be input and applyingthe final-value theorem result in the following:

$\begin{matrix}{{\lim\limits_{s\rightarrow\infty}{s \cdot \frac{1}{s^{2}} \cdot \frac{{K_{p}K_{v}s} + \frac{K_{p}K_{v}}{T_{pi}}}{s^{3} + {K_{v}s^{2}} + {K_{p}K_{v}s} + \frac{K_{p}K_{v}}{T_{pi}}} \cdot \frac{T_{pi}{s^{2}\left( {s + K_{v}} \right)}}{K_{p}{K_{v}\left( {1 + {T_{pi}s}} \right)}}}} = 0} & (3)\end{matrix}$

Formula (3) indicates that incorporating the position integrator 11 inthe position control loop to perform PI control ensures that thesteady-state error becomes strictly 0.

Next, the maximum position error in a transitional state will beinvestigated. Lines L1 and L2 in FIG. 3 are plotted waveforms ofposition errors in a case of stepped position commands being input to acomparative example (which corresponds to exemplary configuration 2)that has a dual loop configuration of position-PI-speed-P control. Gainsetting values corresponding to the respective lines L1 and L2 arelisted in FIG. 5.

Formula (2) indicates that when the position control loop includes thePI controller, a zero point exists in the transfer function from theposition command to the position error, which results in liability toovershoot. Actually, overshoots are observed from lines L1 and L2 inFIG. 3. From a view of mechanical control, however, it is desirable tominimize the amount of overshoot.

In view of this situation, one measure to decrease the overshoot in thisembodiment is to incorporate the speed integrator 12 in the speedcontrol loop. That is, this embodiment provides the double integralconfiguration having the position control loop and the speed controlloop, and makes the response frequency of the speed integrator 12sufficiently larger than the response frequency of the positionintegrator 11. This configuration makes the speed error larger than theposition error.

Lines L3 and L4 in FIG. 3 indicate position errors in a case of steppedposition commands being input to a dual loop configuration of theposition-PI-speed-PI control similar to this embodiment. Gain settingvalues corresponding to the respective lines L3 and L4 in this case arelisted in FIG. 5. FIG. 3 indicates that the addition of the speedintegrator 12 decreases, though slightly, the overshoot amount.

FIG. 4 is a Bode diagram from the position command to the position errorunder the conditions illustrated in FIG. 3. Lines L1 to L4 respectivelycorrespond to lines L1 to L4 in FIG. 3. FIG. 4 indicates that theaddition of speed integral causes the phase of 10 Hz to 30 Hz to proceedwhen K_(v)=40 Hz and causes the phase of 60 Hz to 200 Hz to proceed whenK_(v)=200 Hz. This property contributes to decreasing the overshoot.

Based on the above-described investigation, in the motor controller 100according to this embodiment, the position integrator 11 of the positioncontroller 1 calculates an integral value of the position error by anintegral section (1/T_(pi-s)), which includes a time constant T_(pi),and adds the integral value to the position error. Also, the speedintegrator 12 of the speed controller 2 calculates an integral value ofthe speed error by an integral section (1/T_(i-s)), which includes atime constant T_(i), and adds the integral value to the speed error. Itis noted that the time constant T_(pi) of the position integrator 11corresponds to the first time constant recited in the claims, and thatthe time constant T_(i) of the speed integrator 12 corresponds to thesecond time constant recited in the claims.

Application of Imperfect Integral in Position Controller

Another measure to decrease the overshoot will be investigated. Asdescribed above, the overshoot is caused by the addition of theintegrator having a zero point to the position control loop. In otherwords, the overshoot does not occur if the integrator causing the zeropoint is eliminated. Specifically, in the integral control (I control)by the position controller 1, at the end of the input of the positioncommand, particularly when the motor M is stopped at the end ofdeceleration, the motor position overshoots from the command stopposition to induce vibration, as illustrated in FIG. 6. During thisvibration, a position error may occur. The occurrence of the positionerror is because the response of the integrator itself is slow. In otherwords, the occurrence of the position error is because even after theinput value becomes 0, the output value remains in the integrator for awhile.

Based on the above-described factors, in this embodiment, the positionintegrator 11 includes an imperfect integration function. Imperfectintegration is to multiply the output of an integrator by a coefficientand perform negative feedback of the product to the input of theintegrator so as to gradually decrease the integral output as a result.Specifically, in this embodiment, the position integrator 11 includes animperfect integrator to multiply the output (integral value of theposition error) of the integral section (1/T_(pi-s)) of the positionintegrator 11 by an imperfect integral gain D_(p), and perform negativefeedback of the product to the input of the integral section (see FIG.1).

Lines L5 and L6 in FIG. 7 are plotted waveforms of position errors in acase of stepped position commands being input in position-PI-speed-PIcontrol, which is equivalent to this embodiment, and in a case of 90%imperfect integral ratio being set to the position integrator 11 in theposition-PI-speed-PI control. The gain setting values in lines L5 and L6are identical to the gain setting values in the case of lines L3 and L4in FIG. 5, except the imperfect integral gain D_(p). Lines L3 and L4 inFIG. 7 respectively correspond to lines L3 and L4 in FIG. 3. It is notedthat 90% imperfect integral ratio indicates that 90% of the output fromthe integral section is subtracted from the integral value. FIG. 7indicates that the imperfect integral decreases the overshoot, eventhough the attenuation curves are approximately the same while theposition errors are on the decrease.

FIG. 8 is a Bode diagram from the position command to the position errorunder the conditions of FIG. 7. The lines in FIG. 8 are identical to thelines in FIG. 7. FIG. 8 indicates that the addition of the imperfectintegral results in such changes in the gain and the phase of the lowfrequency band that as the frequency decreases, the position integrationbecomes less effective.

Feed-forward Control

The feed-forward control according to this embodiment includes speedfeed-forward control performed simply based on a first-orderdifferential value of a position command, and torque (acceleration rate)feed-forward control performed based on a second-order differentialvalue of the position command In the speed feed-forward control, theconfiguration illustrated in FIG. 1 is used as it is; that is, aspeed-equivalent value, which is a first-order differential value of theposition command, is multiplied by the feed-forward gain V_(ff), and theproduct is added to the speed command.

In the torque feed-forward control, basically, a torque-equivalentvalue, which is a second-order differential value of the positioncommand, is multiplied by a total moment of inertia J₀ and a torquefeed-forward gain T_(ff), and the product is added to the torque commandIn order to eliminate or minimize the influence of mechanical loosenessand static friction, a preferable configuration not illustrated is toset torque feed-forward gains T_(ff) individually in normal and reversedirections.

In this embodiment, in order to eliminate or minimize the influence ofviscous friction, the speed-equivalent value (first-order differential),which is based on the position command, is multiplied by a viscousfriction compensation coefficient D_(comp), and the product is added tothe torque feed-forward command, as illustrated in FIG. 1. Thisconfiguration is a measure taken for the following reason. As describedabove, a component of the position error that cannot be decreased byproportional control by the proportioner is decreased by integralcontrol by the integral section. The component of the position error issignificantly affected mainly by factors such as disturbance torque dueto the inherent viscous friction of the motor M, which is a controltarget. For example, as illustrated in FIG. 9, in order to actually makethe motor position follow the position command, it is necessary toconstantly input a torque command that is higher than the torque commandthat is based on the position command by an amount corresponding to thedisturbance torque caused by the viscous friction. The disturbancetorque caused by the viscous friction is equal to a value obtained bymultiplying the motor speed by an inherent viscous friction coefficientD of the motor M.

In view of this situation, in this embodiment, the torque feed-forwardcontroller 5 multiplies a torque-equivalent value, which is asecond-order differential value of the position command, by the totalmoment of inertia J₀ of the motor M so as to obtain a first product.Then, the torque feed-forward controller 5 multiplies a speed-equivalentvalue, which is a first-order differential value of the positioncommand, by the viscous friction compensation coefficient D_(comp) ofthe motor M so as to obtain a second product (which is equivalent to theabove-described amount corresponding to disturbance torque). Then, thetorque feed-forward controller 5 adds the second product to the firstproduct and multiplies the sum by the torque feed-forward gain T_(ff) soas to generate a torque feed-forward command. Then, the torquefeed-forward controller 5 performs the torque feed-forward control byadding the torque feed-forward command to the torque command. ps GainBalance

Next, gain balance between feedback gains in the motor controller 100according to this embodiment illustrated in FIG. 1 will be investigated,and investigated gain setting values will be checked as to stability. Abasic concept of the gain balance is that formulae are made in which asecondary attenuation coefficient based on speed loop gain as areference is equal to 1. It is noted that for the time constant T_(i)alone, because of the employment of the speed integrator 12, theattenuation coefficient is made to be approximately 0.7 to minimize thetime constant T_(i).

Specifically, the following Formulae (4) to (6) are used.

$\begin{matrix}{K_{p} = \frac{K_{v}}{2\pi}} & (4) \\{T_{pi} = \frac{4}{K_{p}}} & (5) \\{T_{i} = \frac{2}{K_{v}}} & (6)\end{matrix}$

Next, stability of the control block illustrated in FIG. 1 with respectto the above Formulae will be investigated. In FIG. 1, to facilitateunderstanding, assume that the viscous friction coefficient D of themotor M=D_(comp)=0 , and that a rotor moment J including a rotation axisof the motor M=the total moment of inertia J₀=1. In this case, thetransfer function from the position command to the motor position isrepresented by the following Formula (7):

$\begin{matrix}{\mspace{79mu} {\frac{{b_{5}s^{5}} + {b_{4}s^{4}} + {b_{3}s^{3}} + {b_{2}s^{2}} + {b_{1}s} + b_{0}}{s^{6} + {a_{5}s^{5}} + {a_{4}s^{4}} + {a_{3}s^{3}} + {a_{2}s^{2}} + {a_{1}s} + a_{0}}\mspace{20mu} {where}\mspace{20mu} {a_{5} = {\frac{1}{T} + \frac{1}{T_{f}} + \frac{D_{p}}{T_{pi}}}}\mspace{20mu} {a_{4} = {{\left( {\frac{1}{T} + \frac{1}{T_{f}}} \right)\frac{D_{p}}{T_{pi}}} + {\left( {K_{v} + \frac{1}{T}} \right)\frac{1}{T_{f}}}}}\mspace{20mu} {a_{3} = {\frac{D_{p}}{T_{f}T_{pi}T} + {\left( {\frac{1}{T} + \frac{D_{p}}{T_{pi}} + \frac{1}{T_{i}} + K_{p}} \right)\frac{K_{v}}{T_{f}}}}}{a_{2} = {{\left( {\frac{D_{p}}{T} + \frac{D_{p}}{T_{i}} + {D_{p}K_{p}} + K_{p}} \right)\frac{K_{v}}{T_{f}T_{pi}}} + {\left( {\frac{1}{T} + K_{p}} \right)\frac{K_{v}}{T_{f}T_{i}}} + \frac{K_{p}K_{v}}{T_{f}T}}}\mspace{20mu} {a_{1} = {{\left( {\frac{D_{p}}{T_{pi}T} + \frac{K_{p}}{T} + \frac{D_{p}K_{p}}{T_{pi}} + \frac{K_{p}}{T_{pi}}} \right)\frac{K_{v}}{T_{f}T_{i}}} + {\left( {D_{p} + 1} \right)\frac{K_{p}K_{v}}{T_{f}T_{pi}T}}}}\mspace{20mu} {a_{0} = {\left( {D_{p} + 1} \right)\frac{K_{p}K_{v}}{T_{f}T_{i}T_{pi}T}}}\mspace{20mu} {b_{5} = \frac{T_{ff}}{T}}\mspace{20mu} {b_{4} = {{\left( {\frac{D_{p}}{T_{pi}} + \frac{1}{T_{f}}} \right)\frac{T_{ff}}{T}} + \frac{K_{v}V_{ff}}{T_{f}}}}\mspace{20mu} {b_{3} = {\frac{D_{p}T_{ff}}{T_{f}T_{pi}T} + {\left( {\frac{1}{T} + \frac{D_{p}}{T_{pi}} + \frac{1}{T_{i}}} \right)\frac{K_{v}V_{ff}}{T_{f}}} + \frac{K_{p}K_{v}}{T_{f}}}}{b_{2} = {{\left( {\frac{D_{p}}{T_{pi}T} + \frac{1}{T_{i}T} + \frac{D_{p}}{T_{i}T_{pi}}} \right)\frac{K_{v}V_{ff}}{T_{f}}} + {\left( {D_{p} + 1} \right)\frac{K_{p}K_{v}}{T_{f}T_{pi}}} + {\left( {\frac{1}{T} + \frac{1}{T_{i}}} \right)\frac{K_{p}K_{v}}{T_{f}}}}}\mspace{20mu} {b_{1} = {\frac{D_{p}K_{v}V_{ff}}{T_{f}T_{i}T_{pi}T} + {\left( {D_{p} + 1} \right)\left( {\frac{1}{T} + \frac{1}{T_{i}}} \right)\frac{K_{p}K_{v}}{T_{f}T_{pi}}} + \frac{K_{p}K_{v}}{T_{f}T_{i}T}}}\mspace{20mu} {b_{0} = {\left( {D_{p} + 1} \right)\frac{K_{p}K_{v}}{T_{f}T_{i}T_{pi}T}}}}} & (7)\end{matrix}$

FIG. 10 illustrates a coefficient graph of Formula (7) with K_(v)=2π×40substituted into Formulae (4) to (6). FIG. 11 illustrates a coefficientgraph with K_(v)=2π×200 substituted into Formulae (4) to (6). Thesecases are under the assumption that imperfect integral gain D_(p)=10%.FIGS. 10 and 11 indicate that both cases satisfy a stability sufficientcondition according to the known Lipatov stability criterion. In orderto reduce the overshoot, it is also effective to simply set parametersto satisfy the following relationships simultaneously: relationshipwhere the position control gain K_(p) is approximately proportionate tothe speed control gain K_(v); relationship where the time constantT_(pi) of the position integrator 11 is approximately inverselyproportionate to the position control gain K_(p); and relationship wherethe time constant T_(i) of the speed integrator 12 is approximatelyinversely proportionate to the speed control gain K_(v).

Confirmation of Effects by Simulation

Response by the motor controller 100 according to this embodiment willnow be checked by simulation. For comparison purposes, the followingdescription will also refer to a simulation result of theposition-P-speed-PI control plus speed feed-forward control(V_(ff)=100%) in exemplary configuration 3. FIG. 12 illustrates afrequency property of a control target model used in this simulation.FIGS. 13, 15, 17, and 19 illustrate responses in cases of exemplaryconfiguration 3 being applied to the control target model having thefrequency property illustrated in FIG. 12. FIGS. 14, 16, 18, and 20illustrate responses in cases of the motor controller 100 according tothis embodiment being applied to the control target model having thefrequency property illustrated in FIG. 12. FIGS. 13 and 14 illustratethe position commands and the motor positions. FIGS. 15 and 16illustrate the speed command values and the motor speeds. FIGS. 17 and18 illustrate the position errors. FIGS. 19 and 20 illustrate the torquecommands. Parameters applied to the configurations are listed in FIG.21.

As compared with FIG. 17, FIG. 18 shows a lower maximum position error.Moreover, similarly to FIG. 17, FIG. 18 shows no overshoot of theposition error at the time of completion of issuing the position command(at the end of input of the position command). It is judged from theseobservations that intended performance is obtained.

Advantageous Effects of this Embodiment

The above-described embodiment provides the following advantageouseffects. The motor controller 100 according to this embodiment includesthe position integrator 11, which serves as an integral section in theposition controller 1, and the speed integrator 12, which serves as anintegral section in the speed controller 2. That is, both the positioncontroller 1 and the speed controller 2 include integrators. Thus, boththe position controller 1 and the speed controller 2 in the dualfeedback loop perform the double integral control. This configurationensures that even under an influence of disturbance torque or any otheroccurrence, not only the speed error but also the position error is madeclose to 0 with higher accuracy. This enables the motor controller 100to reduce the position error. In particular, this embodiment provides afeedback-centered control configuration, and this configuration isadvantageous in that the motor controller 100 is less likely to beinfluenced by deterioration over time of machines or by individualdifferences of the machines.

In particular, in this embodiment, the position integrator 11 of theposition controller 1 is an imperfect integrator to multiply an integralvalue of the position error by the imperfect integral gain D_(comp)(<1)and to perform negative feedback of the product to the input of theposition integrator 11. Thus, after the input of the position commandends and the input value (position error in this case) temporarilybecomes close to 0, the output value of the imperfect integratorspontaneously decreases gradually over time. This configuration reducesvibration caused by the overshoot, and thus eliminates or minimizes theposition error.

It is noted that even though the position integrator 11 of the positioncontroller 1 is an imperfect integrator, the speed integrator 12 of thespeed controller 2 makes the speed error at the time of acceleration ordeceleration close to 0. Consequently, no or minimal degradation occursin the dual feedback loop configuration as a whole. That is, theposition controller 1 including the imperfect integrator and the speedcontroller 2 including the perfect integrator is a particularly suitablecombination of functions to implement error-less control in the dualfeedback loop configuration.

In particular, in this embodiment, the position controller 1 adds theoutput of the position integrator 11 to the position error andmultiplies the sum by the position control gain K_(p) to generate thespeed command. The speed controller 2 adds the output of the speedintegrator 12 to the speed error and multiplies the sum by the speedcontrol gain K_(v) to generate the torque command. Thus, both theposition controller 1 and the speed controller 2 each include aproportioner and an integrator to implement the position-PI-speed-PIcontrol. This configuration further reduces the position error, andimplements the error-less control with higher accuracy.

In particular, in this embodiment, the position control gain K_(p) andthe speed control gain K_(v) are approximately proportionate to eachother. The time constant T_(pi) of the position integrator 11 isapproximately inversely proportionate to the position control gainK_(p). The time constant T_(i) of the speed integrator 12 isapproximately inversely proportionate to the speed control gain K_(v).In a conventional dual feedback loop configuration, when both a positioncontroller 1 and a speed controller 2 included integrators, an imbalanceoccurred between the integrators and made vibration more likely to occurdue to overshoot. This necessitated adjustment of the gains so as tosuppress the vibration; however, the adjustment was complicated anddifficult to perform. The inventors have conducted a study and foundthat setting the position control gain K_(p), the speed control gainK_(v), the time constant T_(pi), and the time constant T_(i) to satisfythe above-described relationships simultaneously reduces occurrence ofthe overshoot. This facilitates implementation of the error-less controlby the double integral control using the position controller 1 and thespeed controller 2.

In particular, in this embodiment, the position control gain K_(p), thespeed control gain K_(v), the first time constant T_(pi), and the secondtime constant T_(i) are set to satisfy the following specificrelationships (see Formulae (4), (5), and (6) above):

Kp≈Kv/2π

Tpi≈4/Kp

Ti≈2/K v

This configuration is a specific manner of implementing more highlyaccurate error-less control by the double integral control using theposition controller 1 and the speed controller 2.

In particular, in this embodiment, the torque feed-forward controller 5multiplies the torque-equivalent value, which is a second-orderdifferential value of the position command, by the total moment ofinertia J₀ of a control target of the motor M so as to obtain a firstproduct. Then, the torque feed-forward controller 5 multiplies thespeed-equivalent value, which is a first-order differential value of theposition command, by the viscous friction compensation coefficientD_(comp) of the control target so as to obtain a second product. Then,the torque feed-forward controller 5 adds the second product to thefirst product so as to generate the torque feed-forward command. Then,the torque feed-forward controller 5 performs the torque feed-forwardcontrol by adding the torque feed-forward command to the torque commandThis configuration decreases the load of the integral control in each ofthe integrators and ensures more highly accurate and stable error-lesscontrol. It is noted that the torque feed-forward controller 5 is basedon a feed-forward compensator that uses simple command differentiation.Meanwhile, the dual feedback loop itself has the error-less property.Consequently, the feed-forward controller may be provided as anauxiliary (to reduce the error amount at the time ofacceleration/deceleration).

Otherwise, the above-described embodiments and modifications may becombined in any manner deemed suitable.

Obviously, numerous modifications and variations of the presentdisclosure are possible in light of the above teachings It is thereforeto be understood that within the scope of the appended claims, thepresent disclosure may be practiced otherwise than as specificallydescribed herein.

What is claimed as new and desired to be secured by Letters Patent ofthe United States is:
 1. A motor controller to control a motor, themotor controller comprising: a position controller configured togenerate a speed command based on a position error between a positioncommand and a motor position; a speed controller configured to generatea torque command to be input to the motor based on a speed error betweenthe speed command and a motor speed; a first integrator configured tocalculate an integral value of the position error to be added to theposition error; and a second integrator configured to calculate anintegral value of the speed error to be added to the speed error.
 2. Themotor controller according to claim 1, wherein the first integratorcomprises an imperfect integrator configured to multiply the integralvalue of the position error by an imperfect integral gain and configuredto perform negative feedback of a resultant product to an input of thefirst integrator.
 3. The motor controller according to claim 1, whereinthe position controller is configured to add an output of the firstintegrator to the position error and multiply a resultant sum by aposition control gain so as to generate the speed command, and whereinthe speed controller is configured to add an output of the secondintegrator to the speed error and multiply a resultant sum by a speedcontrol gain so as to generate the torque command.
 4. The motorcontroller according to claim 3, wherein the position control gain andthe speed control gain are set to be approximately proportionate to eachother, wherein a first time constant of the first integrator is set tobe approximately inversely proportionate to the position control gain,and wherein a second time constant of the second integrator is set to beapproximately inversely proportionate to the speed control gain.
 5. Themotor controller according to claim 1, further comprising a torquefeed-forward controller configured to multiply a second-orderdifferential value of the position command by a total moment of inertiaof a control target of the motor so as to obtain a first product,configured to multiply a first-order differential value of the positioncommand by a viscous friction compensation coefficient of the controltarget so as to obtain a second product, configured to add the secondproduct to the first product so as to generate a torque feed-forwardcommand, and configured to add the torque feed-forward command to thetorque command.
 6. A method for controlling a motor, the methodcomprising: generating a speed command based on a position error betweena position command and a motor position; generating a torque command tobe input to the motor based on a speed error between the speed commandand a motor speed; calculating an integral value of the position errorto be added to the position error; and calculating an integral value ofthe speed error to be added to the speed error.
 7. The motor controlleraccording to claim 2, further comprising a torque feed-forwardcontroller configured to multiply a second-order differential value ofthe position command by a total moment of inertia of a control target ofthe motor so as to obtain a first product, configured to multiply afirst-order differential value of the position command by a viscousfriction compensation coefficient of the control target so as to obtaina second product, configured to add the second product to the firstproduct so as to generate a torque feed-forward command, and configuredto add the torque feed-forward command to the torque command.
 8. Themotor controller according to claim 3, further comprising a torquefeed-forward controller configured to multiply a second-orderdifferential value of the position command by a total moment of inertiaof a control target of the motor so as to obtain a first product,configured to multiply a first-order differential value of the positioncommand by a viscous friction compensation coefficient of the controltarget so as to obtain a second product, configured to add the secondproduct to the first product so as to generate a torque feed-forwardcommand, and configured to add the torque feed-forward command to thetorque command.
 9. The motor controller according to claim 4, furthercomprising a torque feed-forward controller configured to multiply asecond-order differential value of the position command by a totalmoment of inertia of a control target of the motor so as to obtain afirst product, configured to multiply a first-order differential valueof the position command by a viscous friction compensation coefficientof the control target so as to obtain a second product, configured toadd the second product to the first product so as to generate a torquefeed-forward command, and configured to add the torque feed-forwardcommand to the torque command.